# -*- coding: utf-8 -*-#

# -------------------------------------------------------------------------------
# Name:         config
# Description:  爬虫配置文件
# Author:       zhuchunxu
# Date:         2020/11/3
# -------------------------------------------------------------------------------


# 抓取详情页链接的爬虫要读取的key
Job51_PAGE_LIST_LINK = "51job:page_list_link"
# 抓取详情页链接的爬虫要存入的redis_key;抓取详情页内容的爬虫要读取的key
Job51_PAGE_Detail_LINK = "51job:page_detail_link"

# 应届生 四川 抓取详情页链接的爬虫要读取的key
YINGJIESHENGSICHUAN_PAGE_LIST_LINK = "yingjieshengsichuan:page_list_link"
# 抓取详情页链接的爬虫要存入的redis_key;抓取详情页内容的爬虫要读取的key
YINGJIESHENGSICHUAN_PAGE_Detail_LINK = "yingjieshengsichuan:page_detail_link"

# 爬取成都人才信息要读取的key
JobScrc_PAGE_LIST_LINK = "scrcJob:page_list_link"
JobScrc_PAGE_Detail_LINK = "scrcJob:page_detail_link"

# 爬取自贡人才信息要读取的key
JobZgrc_PAGE_LIST_LINK = "zgrcJob:page_list_link"
JobZgrc_PAGE_Detail_LINK = "zgrcJob:page_detail_link"

# 爬取攀枝花人才信息要读取的key
JobPzhrc_PAGE_LIST_LINK = "pzhrcJob:page_list_link"
JobPzhrc_PAGE_Detail_LINK = "pzhrcJob:page_detail_link"

# 爬取宜宾人才信息要读取的key
JobYbrc_PAGE_LIST_LINK= "ybrcJob:page_list_link"
JobYbrc_PAGE_Detail_LINK= "ybrcJob:page_detail_link"



# 带爬取的目标网站
TargetWeb = {
    "job51_page_list": {"class_name": ["j_joblist"], "db_name": "redis",
                        "redis_key": Job51_PAGE_Detail_LINK, "wait_time": 5},
    "job51_page_detail": {"class_name": ["tCompanyPage"], "db_name": "mongodb",
                          "wait_time": 5},

    "yingjieshengsichuan_page_list": {"class_name": ["jobul"], "db_name": "redis",
                                      "redis_key": YINGJIESHENGSICHUAN_PAGE_Detail_LINK,
                                      "wait_time": 5},
    "yingjieshengsichuan_page_detail": {"class_name": ["comtit", "jobContent"], "db_name": "text",
                                        "file_type": "json", "file_name": "yingjieshengsichuan.json",
                                        "wait_time": 5},
    "scrc_page_list": {"class_name": "joblist", "db_name": "redis", "redis_key": JobScrc_PAGE_Detail_LINK},
    "scrc_page_detail": {"class_name": "UnitInfoDiv", "db_name": "mongodb"},
    "zgrc_page_list": {"class_name": "job_f_b1_b", "db_name": "redis", "redis_key": JobZgrc_PAGE_Detail_LINK},
    "zgrc_page_detail": {"class_name": "job_de_l_box_c", "db_name": "mongodb"},
    "pzhrc_page_list": {"class_name": "redian3", "db_name": "redis", "redis_key": JobPzhrc_PAGE_Detail_LINK},
    "pzhrc_page_detail": {"class_name": "zright", "db_name": "mongodb"},
    "ybrc_page_list": {"class_name": "qzListBox_v2", "db_name": "redis", "redis_key": JobYbrc_PAGE_Detail_LINK},
    "ybrc_page_detail": {"class_name": "fc-wrap", "db_name": "mongodb"},
}

MONGODB_URI = "mongodb://192.168.102.31:27017/"
MONGODB_DBNAME = "jobs"
MONGODB_DBCOL = "job_info"

REDIS_SERVER_HOST = "192.168.102.21"
REDIS_PASS = "hwadee@2020"
